<%@page import="com.tk.entity.Hero"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>任用罢免</title>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="css/manage.css" />
<!--<link rel="stylesheet" href="css/new_file.css" />-->
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="js/getBodyWidAndHei.js"></script>
<script type="text/javascript" src="js/time.js"></script>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head onload="getNowFormatDate()">
<%
	Hero hero = (Hero) request.getSession().getAttribute("hero");
	if (hero == null)
		request.getRequestDispatcher("index.jsp");
%>

<div class="title">
	<div class="date">
		<p></p>
	</div>
</div>
<!--顶部日期-->
				
		
<!--左侧栏-->
<div class="information">
	<ul>
		<li id="liFirst">
			<div class="headImg">
				<img src="img/home/普通用户.jpg" />
			</div>
			<div id="myName">
				<p>
					<%
						out.print(hero.getHname());
					%>
				</p>
				<br>
				<p>
					<%
						out.print(hero.getPos());
					%>
				</p>
				<br>
				<p>
					<%
						out.print(hero.getTeam());
					%>
				</p>
				<br>
			</div>
		</li>
		<li><a href="servlet/PaginationTheme" >天下形势</a></li>
		<li class="dropdown"><a href="servlet/findheroServlet?tog=repos">日理万机</a>
			<div class="dropdown-content">
				<ul>
					<li><a href="servlet/findheroServlet?tog=repos">任用罢免</a></li>
					<li><a href="servlet/findheroServlet?tog=kill">生杀大权</a></li>
					<li><a>奖率三军</a></li>
					<li><a>调兵遣将</a></li>
				</ul>
			</div></li>
		<li><a>知心交友</a></li>
		<li><a href="home/resume.jsp">英雄履历</a></li>
	</ul>
</div>

<div class="otherInfor">
	<div class="headText">
		<p>
			4级：神仙、3级：主公、2级：大都督、1级：平民<br>
			<%
				String err = (String) request.getAttribute("error");
				if (err != null)
					out.println(err + "<br>");
			%>
		</p>
	</div>
	<!--表格-->
	<div class="newTable">
		<table>
			<tr id="title">
				<td>阵营</td>
				<td>用户名</td>
				<td>姓名</td>
				<td>字号</td>
				<td>籍贯</td>
				<td>职务</td>
				<td>职务等级</td>
				<td>状态</td>
			</tr>
			<c:if test="${empty heroList}">
				<tr>
					<td colspan="8">别想了，江湖的最底层的小卒子</td>
				</tr>
			</c:if>
			<c:forEach items="${heroList}" var="thero">
				<tr>
					<td>${thero.team}</td>
					<td>${thero.hid}</td>
					<td>${thero.hname}</td>
					<td>${thero.alias}</td>
					<td>${thero.add}</td>
					<td>${thero.pos}</td>
					<td>
						<form action="servlet/reposServlet" method="post">
							<input type="hidden"
								value=<%=request.getSession().getAttribute("posnum")%>
								name="mypos"> <input type="hidden" value="${thero.hid}"
								name="rehid"> <input type="text" value="${thero.posnum}"
								name="reposnum"> <input type="submit" value="提交">
						</form>
					</td>
					<td>${thero.status}</td>
				</tr>
			</c:forEach>
		</table>
	</div>
</div>
</body>
</html>